<!DOCTYPE html>
<html lang="en">
<head>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="telephone=no,email=no" name="format-detection">
    <meta name="wap-font-scale" content="no">
    <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title><?=$title?></title>
    <link rel="stylesheet" href="/mobile/css/reset.css">
    <link rel="stylesheet" href="/mobile/css/mui.min.css">
    <script src="/mobile/js/flexible_css.debug.js"></script>
    <script src="/mobile/js/flexible.debug.js"></script>
    <link rel="stylesheet" href="/mobile/css/main_train.css">

</head>
<body>
<div id="back-btn-wrap">
    <a class="back-btn" href="javascript:history.go(-1)"></a><i id="nav-title">优秀学员</i>
</div>
<div class="content-main">
    <h2 id="gs-title">2017年度&nbsp;共: <i id="total-num"></i>题</h2>
    <ul id="good-list-wrap">
        <li class="parent-list">
            <ul class="child-list-wrap" style="">
            </ul>
        </li>
    </ul>
</div>

<script src="/mobile/js/jquery.min.js"></script>
<script src="/mobile/js/common.js"></script>
<script src="/mobile/js/mui.min.js"></script>
<script src="/mobile/js/jrrpc.js"></script>

<script>
    $(function(){
        mui.init();
        var token = iService.getAppParam();
        mui(".parent-list").on('tap','.parent-item',function(){
            if($(this).hasClass('active')){
                $(this).siblings('.child-list-wrap').hide();
                $(this).removeClass('active');
            }else {
                $(this).addClass('active');
                $(this).siblings('.child-list-wrap').show();
                $(this).parent('.parent-list').siblings('.parent-list').find('.child-list-wrap').hide();
                $(this).parent('.parent-list').siblings('.parent-list').find('.parent-item').removeClass('active');
            }
        });
        mui(".parent-list").off('tap'); //二级内容
        var rank = iService.getQueryString('rank');
        var param = {
            postData:'Question/excellent',
            data: {
                page:1
            }
        };
        $.extend(param.data,token);
        $.JsonRpc(param,function(result){
            console.log(result);
            var data = result.data;
            if(!data.top.length){
                $("#total-num").html(0);
                $('.child-list-wrap').html('<p class="null-wrap">暂无数据</p>');
                return false;
            }
            $("#total-num").html(data.top[0].total);
            $.each(data.top,function(i){
                $(
                    '<li class="child-list">'+
                    '<span class="avatar-member" style="background: url('+data.top[i].avatar+') center center no-repeat; background-size: cover;"></span>'+
                    '<span>'+data.top[i].nickname+' </span>'+
                    '<span>'+data.top[i].section+' </span>'+
                    '<span>答对'+data.top[i].correct+'题目</span>'+
                    '<i class="fr rank">'+(parseInt(i)+1)+'</i>'+
                    '</li>'
                ).appendTo('.child-list-wrap');
            });
        });
        $.get('https://www.wzxaini9.cn/api/flow/index/id/11', function (data) {
            console.log($.parseJSON(data));
        })
    });
</script>
</body>
</html>












